//
//  WBTestViewController.m
//  TransWB
//
//  Created by 孝飞王 on 16/12/23.
//  Copyright © 2016年 孝飞王. All rights reserved.
//

#import "WBTestViewController.h"

@interface WBTestViewController ()

@end

@implementation WBTestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor =[UIColor whiteColor];
    [self setNavigationItem];
}

- (void)setNavigationItem{
    
    self.navItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:[UIButton cz_titleAndImage:nil title:@"下一个" taget:self action:@selector(rightBarItemClick)]];
    self.navItem.title = [NSString stringWithFormat:@"第%ld个",self.navigationController.viewControllers.count];
}

- (void)rightBarItemClick{
    
    UIViewController *vc = [[WBTestViewController alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    [self dismissViewControllerAnimated:YES completion:nil];
    
}
@end
